<?php
include('includes/connect.php');

$vendors_id=explode("#?",$_POST['test']);

		$sql= mysql_query("select * from vendors where vendors_id=".$vendors_id[1]);

		$qury = mysql_fetch_array($sql);

		$subCat = mysql_query("select * from vendors as v, subcategories as vsubcategories where vsubcategories.subcategory_id = v.subcategory_id and vendors_id=".$vendors_id[1]);
		
		$getSubCat = mysql_fetch_array($subCat);

		$vendorType = mysql_query("select * from vendors as v, vendor_cat as vCat where vCat.vendor_cat_id = v.vendor_cat_id and v.vendors_id=".$vendors_id[1]);

		$getVendorType = mysql_fetch_array($vendorType);

		$vendorCat = mysql_query("select * from vendors as v, categories as cat where cat.category_id = v.vendor_category_id and v.vendors_id=".$vendors_id[1]);

		$getVendorCat = mysql_fetch_array($vendorCat);

		$countries = mysql_query("select * from vendors as v, countries as con where con.country_id = v.country_id and v.vendors_id=".$vendors_id[1]);

		$getcountries = mysql_fetch_array($countries);

		
?>
<style>
	.heading{
		font-weight: 200;
	}

</style>
	<div id="profile">

		<div style="float:left; margin: 10px;">
                            <table border="1" width="100%" cellspacing="0" cellpadding="9">						
                                
								<tr><td colspan="4" style="height:15px;"></td></tr>

								<tr>
                                    <td width="170" class="heading">Company Name:</td>
                                    <td width="200"><?php echo $qury['company_name'];?></td>
									<td width="250" class="heading">Website Name (If any):</td>
                                    <td width="250"><?php echo $qury['website_name'];?></td>
                                </tr>
								
								<tr>
                                    <td class="heading">Company Address:</td>
                                    <td><?php echo $qury['company_address'];?></td>
									<td class="heading">Product Dealing:</td>
									<td><?php echo $qury['product_dealing'];?></td>
                                    
                                </tr>
								<tr>
                                    <td class="heading">Person In Charge/Owner:</td>
                                    <td><?php echo $qury['person_in_charge_owner'];?></td>
									<td class="heading">Country:</td>
									<td><?php echo $getcountries['name'];?></td>
                                </tr>		
                                <tr>
                                    <td class="heading">Phone:</td>
									<td><?php echo $qury['vendors_phone'];?></td>
									<td class="heading" valign="top">Are you willing to Supply Equipment:</td>
                                    <td>
										<?php
											$supply = mysql_query("select * from location where user_type = 'Vendor' and user_id=".$vendors_id[1]);

											while($getsupply = mysql_fetch_array($supply))
											{
												echo $getsupply['location'].'<br />';
											}
										?>
									</td>
                                </tr>				
                                
                                <tr>
                                    <td class="heading"> Mobile:</td>
                                    <td><?php echo $qury['vendors_mob'];?></td>
									<td class="heading">Companies/Clients Served (If u wish to disclosure):</td>
                                    <td><?php echo $qury['companies_clients_served'];?></td>
                                </tr>	
								
								<tr>
                                    <td class="heading">Residence No:</td>
                                    <td><?php echo $qury['vendors_res_no'];?></td>
									<td class="heading">Your Company&#39;s USP (Unique Selling Point):</td>
                                    <td><?php echo $qury['companys_USP'];?></td>
                                </tr>                                  

                                      
                                <tr>
                                    <td class="heading">User Name:</td>
                                    <td><?php echo $qury['vendors_username'];?></td>
									<td class="heading">Company/Owners Experience (Years):</td>
								    <td><?php echo $qury['company_owners_experience'];?></td>
                                </tr>                                                                                               
								<tr>
									<td class="heading">Vendor Type:</td>
                                    <td><?php echo $getVendorType['vendor_cat'];?></td>
									<td class="heading">Awards & accolade:</td>
								    <td><?php echo $qury['awards_accolade'];?></td>
								</tr> 

								<tr>
									<td class="heading">Vendor Category:</td>
									<td><?php echo $getVendorCat['category'];?></td>
                                    <td class="heading">Company Information:</td>
									<td><?php echo $qury['company_info'];?></td>

								</tr>
				
								<tr>
									<td class="heading">Vendor Sub-Category:</td>
                                    <td><?php echo $getSubCat['subcategory'];?></td> 
								</tr>
                          					
                                
                            </table>
							</div>

	</div>
